package com.qj.yantaishan.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;
import com.qj.yantaishan.mapper.CommentReplyMapper;
import com.qj.yantaishan.domain.CommentReply;
import com.qj.yantaishan.service.ICommentReplyService;
import com.qj.yantaishan.common.core.text.Convert;

/**
 * 评论回复Service业务层处理
 * 
 * @author qihe
 * @date 2022-07-22
 */
@Service
@Primary
public class CommentReplyServiceImpl    extends ServiceImpl<CommentReplyMapper, CommentReply>  implements ICommentReplyService
{
    @Autowired
    private CommentReplyMapper commentReplyMapper;

    /**
     * 查询评论回复
     * 
     * @param id 评论回复主键
     * @return 评论回复
     */
    @Override
    public CommentReply selectCommentReplyById(Long id)
    {
        return commentReplyMapper.selectCommentReplyById(id);
    }

    /**
     * 查询评论回复列表
     * 
     * @param commentReply 评论回复
     * @return 评论回复
     */
    @Override
    public List<CommentReply> selectCommentReplyList(CommentReply commentReply)
    {
        return commentReplyMapper.selectCommentReplyList(commentReply);
    }

    /**
     * 新增评论回复
     * 
     * @param commentReply 评论回复
     * @return 结果
     */
    @Override
    public int insertCommentReply(CommentReply commentReply)
    {
        return commentReplyMapper.insertCommentReply(commentReply);
    }

    /**
     * 修改评论回复
     * 
     * @param commentReply 评论回复
     * @return 结果
     */
    @Override
    public int updateCommentReply(CommentReply commentReply)
    {
        return commentReplyMapper.updateCommentReply(commentReply);
    }

    /**
     * 批量删除评论回复
     * 
     * @param ids 需要删除的评论回复主键
     * @return 结果
     */
    @Override
    public int deleteCommentReplyByIds(String ids)
    {
        return commentReplyMapper.deleteCommentReplyByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除评论回复信息
     * 
     * @param id 评论回复主键
     * @return 结果
     */
    @Override
    public int deleteCommentReplyById(Long id)
    {
        return commentReplyMapper.deleteCommentReplyById(id);
    }
}
